package com.nuoniu.sibanyun.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@ApiModel("生产订单_明细")
public class VProductionOrderDetailSaveDto {

    @ApiModelProperty(value = "客户id")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;



    @ApiModelProperty(value = "产品类型")
    @TableField("product_type")
    private Integer productType;

    @ApiModelProperty(value = "预入仓库ID")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "预入仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "预入仓库编码")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ApiModelProperty(value = "物料id")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "物料编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "物料名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "bomID")
    @TableField("bom_id")
    private Integer bomId;

    @ApiModelProperty(value = "bom名称")
    @TableField("bom_name")
    private String bomName;

    @ApiModelProperty(value = "bom版本")
    @TableField("bom_version")
    private String bomVersion;

    @ApiModelProperty(value = "生产车间id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "生产车间名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "业务状态")
    @TableField("business_status")
    private Integer businessStatus;

    @ApiModelProperty(value = "计划开始时间")
    @TableField("plan_begin_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate planBeginDate;

    @ApiModelProperty(value = "计划结束时间")
    @TableField("plan_end_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate planEndDate;

    @ApiModelProperty(value = "是否倒冲料")
    @TableField("is_backflush_material")
    private Boolean isBackflushMaterial;

    @ApiModelProperty(value = "需求优先级")
    @TableField("demand_priority")
    private String demandPriority;

    @ApiModelProperty(value = "排产状态")
    @TableField("scheduling_status")
    private Integer schedulingStatus;

    @ApiModelProperty(value = "领料状态")
    @TableField("picking_status")
    private Integer pickingStatus;

    @ApiModelProperty(value = "单计量ID")
    @TableField("unit_id")
    private Integer unitId;

    @ApiModelProperty(value = "计量单位组ID")
    @TableField("unit_group_id")
    private Integer unitGroupId;

    @ApiModelProperty(value = "主计量ID")
    @TableField("base_unit")
    private Integer baseUnit;

    @ApiModelProperty(value = "主计量名称")
    @TableField("base_unit_name")
    private String baseUnitName;

    @ApiModelProperty(value = "数量（主计量）")
    @TableField("base_quantity")
    private BigDecimal baseQuantity;

    @ApiModelProperty(value = "辅计量ID")
    @TableField("sub_unit")
    private Integer subUnit;

    @ApiModelProperty(value = "辅计量名称")
    @TableField("sub_unit_name")
    private String subUnitName;

    @ApiModelProperty(value = "数量（辅计量）")
    @TableField("sub_quantity")
    private BigDecimal subQuantity;

    @ApiModelProperty(value = "换算率")
    @TableField("unit_exchange_rate")
    private BigDecimal unitExchangeRate;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源单据日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "来源明细ID")
    @TableField("source_detail_id")
    private Integer sourceDetailId;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

}
